package com.encryption.logic;

import com.encryption.service.ca.util.CryptoUtil;
import com.encryption.util.ConfigProperties;
import com.encryption.util.ConfigPropertyContanst;

public class UserDefaultPsdHelper {
	private static String defaultPassword="";
	private static String md5DefaultPassword="";
	
	public static String getDefaultPassword(){
		if("".equals(defaultPassword))
			defaultPassword = ConfigProperties.getProperty(
					ConfigPropertyContanst.USER_DEFAULT_PASSWORD,"hello123456");
		
		return defaultPassword;
	}
	
	public static String getMd5DefaultPsd(){
		if("".equals(md5DefaultPassword))
			md5DefaultPassword = CryptoUtil.md5(getDefaultPassword());
		
		return md5DefaultPassword;
	}
}
